
var a = 1;
function printA(){
    console.log(this.a);
}
var obj={
    a:2,
    foo:printA,
    bar:function(){
        printA();
    }
}

obj.foo(); //? 2
obj.bar(); //? undefined 找到了global
var foo = obj.foo;
foo(); //? undefined 因为这个找到了global
